<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>代理商页面页面管理</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="../../bangnuo/admin/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="../../bangnuo/admin/style/admin.css" media="all">
	</head>
	<script src="../../bangnuo/login/js/jquery-1.8.0.min.js"></script>
	<script>
		$(document).ready(function(){
			/* 查询页面 */
			$.ajax({
				type: 'GET',
				url: '',
				dataType: 'JSON',
				success: function(data){
					if(data.success == "true"){
						//有值
						$("#agentListDesc").val(data.data);
					}else{
						//为空
						$("#agentListDesc").val("");
					}
				}
			});
			/* 新增页面 */
			$.ajax({
				type: 'GET',
				url: '',
				dataType: 'JSON',
				success: function(data){
					if(data.success == "true"){
						//有值
						$("#agentAddDesc").val(data.data);
					}else{
						//为空
						$("#agentAddDesc").val("");
					}
				}
			});
			/* 修改页面 */
			$.ajax({
				type: 'GET',
				url: '',
				dataType: 'JSON',
				success: function(data){
					if(data.success == "true"){
						//有值
						$("#agentEditDesc").val(data.data);
					}else{
						//为空
						$("#agentEditDesc").val("");
					}
				}
			});
		});
	</script>
	<body style="margin: 15px; padding: 15px;">
		
		<!-- 代理商页面 -->
		<form class="layui-form">
			 <div class="layui-form-item">
			    <label class="layui-form-label">编号</label>
			    <div class="layui-input-block">
			      <input type="text" name="id" id="agentListId" readonly="readonly" required placeholder="" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">代理商查询页面</label>
				<div class="layui-input-block">
					<textarea style="width: 100%; height: 200px;" id="agentListDesc" name="desc" placeholder="请输入内容" class="layui-textarea">111</textarea>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">是否显示</label>
				<div class="layui-input-block">
					<input type="radio" id="agentListDescS" name="type" value="1" title="是">
					<input type="radio" id="agentListDescF" name="type" value="0" title="否" checked>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit lay-filter="formDemo1">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
		
		<!-- 代理商新增页面 -->
		<form class="layui-form">
			<div class="layui-form-item">
			   <label class="layui-form-label">编号</label>
			   <div class="layui-input-block">
			     <input type="text" name="id" id="agentAddId" required  lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			   </div>
			 </div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">代理商新增页面</label>
				<div class="layui-input-block">
					<textarea style="width: 100%; height: 200px;" name="desc" id="agentAddDesc" placeholder="请输入内容" class="layui-textarea"></textarea>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">是否显示</label>
				<div class="layui-input-block">
					<input type="radio" id="agentAddDescS" name="type" value="1" title="是">
					<input type="radio" id="agentAddDescF" name="type" value="0" title="否" checked>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit lay-filter="formDemo2">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
		<!-- 代理商 修改-->
		<form class="layui-form">
			<div class="layui-form-item">
			   <label class="layui-form-label">编号</label>
			   <div class="layui-input-block">
			     <input type="text" name="id" id="agentEditId" required  lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
			   </div>
			 </div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">代理商修改页面</label>
				<div class="layui-input-block">
					<textarea style="width: 100%; height: 200px;" name="desc" id="agentEditDesc" placeholder="请输入内容" class="layui-textarea"></textarea>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">是否显示</label>
				<div class="layui-input-block">
					<input type="radio" id="agentEditDescS" name="type" value="1" title="是">
					<input type="radio" id="agentEditDescF" name="type" value="0" title="否" checked>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit lay-filter="formDemo3">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
		
	</body>
	<script src="../../bangnuo/admin/layui/layui.js"></script>
	<script>
		layui.use('form', function() {
			var form = layui.form;
			/* 代理商查询 */
			//监听提交
			form.on('submit(formDemo1)', function(data) {
				layer.msg(JSON.stringify(data.field));
				return false;
			});
			/* 代理商新增 */
			//监听提交
			form.on('submit(formDemo2)', function(data) {
				layer.msg(JSON.stringify(data.field));
				return false;
			});
			/* 代理商修改 */
			//监听提交
			form.on('submit(formDemo3)', function(data) {
				layer.msg(JSON.stringify(data.field));
				return false;
			});
		});
	</script>
</html>
